package com.lf.web.service.system.extension;

import com.lf.data.*;

import java.util.Map;

public class Extension extends Cluster {

    @Key(keyType = KeyType.MapKey, valueType = ValueType.String, check = "^[\\s\\w\u4e00-\u9fa5]{1,50}$", nullable = false)
    public static final String NAME = "name";

    @Key(keyType = KeyType.MapKey, valueType = ValueType.String, check = "^\\w{1,20}$", nullable = false)
    public static final String TYPE = "type";

    @Key(keyType = KeyType.MapKey, valueType = ValueType.String, check = "^\\w{1,100}$", nullable = false)
    public static final String BEAN = "bean";

    @Key(keyType = KeyType.MapKey, valueType = ValueType.String, check = "", nullable = false)
    public static final String DESCRIPTION = "description";

    @Key(keyType = KeyType.MapKey, valueType = ValueType.String, check = "^\\w+$", nullable = false)
    public static final String TEMPLATE = "template";


    @Key(keyType = KeyType.MapKey, valueType = ValueType.String, check = "", nullable = false)
    public static final String CONFIG = "config";

    @Key(keyType = KeyType.MapKey, valueType = ValueType.String, check = "", nullable = false)
    public static final String LOCATION = "location";

    @Key(keyType = KeyType.MapKey, valueType = ValueType.String, check = "", nullable = false)
    public static final String STATUS = "status";

    @Key(keyType = KeyType.MapKey, valueType = ValueType.String, check = "[\\d\\.]+", nullable = false)
    public static final String VERSION = "version";

    @Key(keyType = KeyType.MapKey, valueType = ValueType.DateTime, check = Validate.DATETIME, nullable = true)
    public static final String CREATED = "created";

    @Key(keyType = KeyType.MapKey, valueType = ValueType.String, check = "^\\w+$", nullable = false)
    public static final String KEY = "key";

    public static final String INSTALLDATE = "installDate";


    public Extension() {
        super();
    }

    public Extension(Map<String, Object> map) {
        super(map);
    }
}
